package com.zed.game.answer.fetures;

import com.zed.api.games.answer.show.AnswerShowWorld;
import com.zed.api.persistence.core.util.PersistentException;

import java.util.List;

/**
 * 题库读写器
 *
 * @author Zed
 */
public interface QuestionBankReadWriter {

    /**
     * 保存多个题目,如果存在则覆盖
     *
     * @param answerShowWorlds {@link AnswerShowWorld}
     * @throws PersistentException, 保存时的例外
     */
    void save(AnswerShowWorld... answerShowWorlds) throws PersistentException;

    /**
     * 删除多个题库
     *
     * @param ids {@link String[]}
     * @throws PersistentException, 删除时的例外
     */
    void delete(String... ids) throws PersistentException;

    /**
     * 希望加载的数量
     *
     * @param size {@link int},数量
     * @return {@link List}
     */
    List<AnswerShowWorld> loadWithHopeSize(long size);
}
